package com.example.inflection.entity;

import java.text.NumberFormat;
import java.time.LocalDate;
import java.io.Serializable;
import java.sql.Date;
import java.util.Objects;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author wu
 * @since 2021-05-15
 */

public class Local implements Serializable {

    private Date date;

    private String county;

    private String state;

    private Integer cases;

    private Integer deaths;

    private double cfs;
  private Object o;

  public Local() {
    }

  public Date getDate() {
    return date;
  }

  public void setDate(Date date) {
    this.date = date;
  }

  public String getCounty() {
    return county;
  }

  public void setCounty(String county) {
    this.county = county;
  }

  public String getState() {
    return state;
  }

  public void setState(String state) {
    this.state = state;
  }

  public Integer getCases() {
    return cases;
  }

  public void setCases(Integer cases) {
    this.cases = cases;
  }

  public Integer getDeaths() {
    return deaths;
  }

  public void setDeaths(Integer deaths) {
    this.deaths = deaths;
  }

  public double getCfs() {
    return cfs;
  }

  public void setCfs(double cfs) {
    this.cfs = cfs;
  }

  @Override
  public String toString() {
    return "Local{" +
            "date=" + date +
            ", county='" + county + '\'' +
            ", state='" + state + '\'' +
            ", cases=" + cases +
            ", deaths=" + deaths +
            ", cfs='" + cfs + '\'' +
            '}';
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    Local local = (Local) o;
    return Double.compare(local.cfs, cfs) == 0 && Objects.equals(date, local.date) && Objects.equals(county, local.county) && Objects.equals(state, local.state) && Objects.equals(cases, local.cases) && Objects.equals(deaths, local.deaths);
  }

  @Override
  public int hashCode() {
    return Objects.hash(date, county, state, cases, deaths, cfs);
  }
}
